<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    let parent4 = {
      name: 'parent4',
      friends: ['p1', 'p2', 'p3'],
      getName: function () {
        return this.name;
      },
    };
    let person4 = Object.create(parent4);
    person4.name = 'tom';
    person4.friends.push('tom');

    let person5 = Object.create(parent4);
    person5.friends.push('bob');

    console.log(person4.name);
    console.log(person4.name === person4.getName());
    console.log(person5.name);
    console.log(person4.friends);
    console.log(person5.friends);
  </script>
</html>
